package com.example.demo.time;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * <pre>
 *  描述:
 * </pre>
 *
 * @author godelgnis(wujiaer)
 * @version 1.0.0
 * @date 2021/10/27 17:15
 */
public class DateTest {
    public static void main(String[] args) {
        System.out.println(DateUtil.beginOfHour(new Date(1635325336 * 1000L)).toInstant().getEpochSecond());
        System.out.println(DateUtil.beginOfDay(new Date(1635325336 * 1000L)).toInstant().getEpochSecond());
        System.out.println(DateUtil.beginOfMonth(new Date(1635325336 * 1000L)).toInstant().getEpochSecond());
        System.out.println(DateUtil.beginOfYear(new Date(1635325336 * 1000L)).toInstant().getEpochSecond());
    }
}
